<html xmlns:th="http://www.thymeleaf.org"
	  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<div th:fragment="attendcetable">
<div class="bgc-w box box-primary">
	<div class="box-header" style="padding-bottom: 20px">
		<a class="label label-success" href="" th:href="@{attendceatt}">
			<span class="glyphicon glyphicon-refresh"></span>刷新
		</a>
	<form th:action="@{/attendceatt}" th:method="post">
		<div class="input-group" style="width:150px;float:right;top:-21px">
			<input type="text" class="form-control input-sm pull-right baseKey" name="userName" value=""  placeholder="按姓名查询..." />
				<div class="input-group-btn" style="top:-1px;">
					<input type="submit" class="btn btn-sm btn-default glyphicon glyphicon-search btn-change baseKetsubmit" value="查询">
				</div>
		</div>
	</form>
	</div>
	<div class="box-body">
		<div class="table" style="padding-top: 15px;">
			<div class="">
				<table class="table table-hover table-striped">
					<tr class="table-header">
						<th scope="col">用户名</th>
						<th scope="col" class="paixu thistype" style="color:blue;">类型
								<span class="glyphicon ${icon}"></span>
						</th>
						<th scope="col">
							<span class="paixu thistime" style="color:blue;">时间
								<span class="glyphicon ${icon}"></span>
							</span>
						</th>
						<th scope="col">ip</th>
						<th scope="col ">备注</th>
						<th scope="col">
							<span class="paixu thisstatus" style="color:blue;" >状态
								<span class="glyphicon ${icon}"></span>
							</span>
						</th>
						<th scope="col">操作</th>
					</tr>
					<tr th:each="aoaAttendsList:${attendList}">

						<td >
							<span th:text="${aoaAttendsList.aoaUser.userName}"></span>
						</td>

						<td  >
							<span th:text="${#typeDict.getTypeName('aoa_attends_list',aoaAttendsList.type)}"></span>
						</td>

						<td >
							<span th:text="${#dates.format(aoaAttendsList.attendsTime,'yyyy-MM-dd HH:mm:ss')}"></span>
						</td>

						<td >
							<span th:text="${aoaAttendsList.attendsIp}"></span>
						</td>

						<td th:text="${aoaAttendsList.attendsRemark}"></td>

						<td>
							<span class="label" th:classappend="${#statusDict.getStatusColor('aoa_attends_list',aoaAttendsList.status)}" th:text="${#statusDict.getStatusName('aoa_attends_list',aoaAttendsList.status)}"></span>
						</td>

						<td>
							<a th:href="@{/attendceedit(attendsId=${aoaAttendsList.attendsId})}" class="label xiugai">
								<span class="glyphicon glyphicon-edit"></span> 修改
							</a>
							<a onclick="{return confirm('删除该记录将不能恢复，确定删除吗？');};"
							   	th:onclick="{return confirm('删除该记录将不能恢复，确定删除吗？');};"
							    th:href="@{/attdelete(aid=${aoaAttendsList.attendsId})}" class="label shanchu">
								<span class="glyphicon glyphicon-remove"></span> 删除
							</a>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<!--分页导航-->
	<div class="container">
		<div class="row text-center">
			<div class="col-md-12">
				<ul class="pagination">
					<li><a th:class="${currentPage eq 1 ? 'btn disabled' : '' }" href="javascript:;" th:href="@{/attendceatt(page=1)}">首页</a></li>
					<li><a th:class="${currentPage eq 1 ? 'btn disabled' : '' }" href="javascript:void(0);" th:href="@{/attendceatt(page=${currentPage}-1)}">&laquo;</a></li>

					<li th:class="${page eq currentPage} ? 'active' : ''" th:each="page:${#numbers.sequence(1,totalPage)}">
						<a href="javascript:void(0);" th:href="@{/attendceatt(page=${page})}" th:text="${page}">1</a>
					</li>

					<li><a th:class="${currentPage eq totalPage ? 'btn disabled' : '' }" href="javascript:void(0);" th:href="@{/attendceatt(page=${currentPage}+1)}">&raquo;</a></li>
					<li><a th:class="${currentPage eq totalPage ? 'btn disabled' : '' }" href="#" th:href="@{/attendceatt(page=${totalPage})}" style="border: 1px solid #ddd;">尾页</a></li>
					<li><a style="border: 0px;margin-left: 0px;">当前页<span th:text="${currentPage}"></span>/<span th:text="${totalPage}"></span>总页</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
	<script type="text/javascript" th:src="@{/js/jquery.min.js}"></script>
	<script type="text/javascript" th:src="@{/dist/js/bootstrap.min.js}"></script>
	<script type="text/javascript" th:src="@{/js/index.js}"></script>
</div>
</div>
</html>